inline HTML images using PEAR"s mail_mime?

inline HTML images using PEAR"s mail_mime?

am 29.11.2007 17:33:03 von Law Poop

Hello all --

I'm having a problem getting images to appear in the body of an HTML
email using PEAR's mail_mime class.

Here's my code, what am I doing wrong?

include("Mail.php");
include("./Mail/mime.php");

$text = "Text version of email";

$html = "HTML version of email.

This is a test of
html capabilities within the body of
the email.

";

$file = "./images/logo.jpg";

$crlf = "\n";

$hdrs = array(
"From" => "lawpoop@gmail.com",
"Subject" => "Test message"
);

$mime = new Mail_mime($crlf);

$mime -> setTXTBody($text);

$mime -> addHTMLImage("./images/logo.jpg");

$mime -> setHTMLBody($html);

$mime -> addAttachment( $file, "image/jpeg" );

$body = $mime->get();

$hdrs = $mime->headers($hdrs);

$mail =& Mail::factory("mail");

$mail -> send("lawpoop@gmail.com", $hdrs, $body);

echo "

Message sent!

";

Re: inline HTML images using PEAR"s mail_mime?

am 29.11.2007 18:25:53 von Law Poop

Nevermind. The problem seems to be gmail not displaying inline
email! ;)

Re: inline HTML images using PEAR"s mail_mime?

am 29.11.2007 18:26:21 von Law Poop

Er, inline images in email, that is!